# 视频/图片处理小工具
export MEDIA_MAKEFILE="$HOME/.local/share/makemedia/Makefile"

makeframe() {
  local video="$1"
  if [ -n "$video" ]; then
    make -f "$MEDIA_MAKEFILE" VIDEO="$video" frame
  else
    make -f "$MEDIA_MAKEFILE" frames
  fi
}

makehalf() {
  local pic="$1"
  if [ -n "$pic" ]; then
    make -f "$MEDIA_MAKEFILE" PIC="$pic" half
  else
    make -f "$MEDIA_MAKEFILE" halfs
  fi
}

makeclean() {
  make -f "$MEDIA_MAKEFILE" clean
}

# windows 中 设置 wsl 改 ：~/.bash_profile

# 前置包：
# sudo apt install imagemagick ffmpeg -y
# - covert :imagemagick
# - ffmpeg :ffmpeg
 